﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NCD.ORMDbContext.Dapper
{
    public interface IDapperContext
    {
        // <summary>
        /// 标识事务是否开启
        /// </summary>
        bool IsTransactionStarted { get; }

        /// <summary>
        /// 开始事务.
        /// </summary>
        void BeginTransaction();

        /// <summary>
        /// 提交事务.
        /// </summary>
        void Commit();

        /// <summary>
        /// 事务回滚.
        /// </summary>
        void Rollback();
    }
}
